package com.xinlong.utils;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;
import java.util.List;

public class TypeConversionUtils {
    public static Map<String,Object> ListConversionMap(List<Map<String,Object>> list){
        Map<String, Object> map = new HashMap<String, Object>();
        for(Map<String,Object> temp:list){
            for(String key:temp.keySet()){
                if(map.containsKey(key)){
                    List list1 = ((List)map.get(key));
                    list1.add(temp.get(key));
                    map.put(key,list1);
                }else{
                    List list1 = new ArrayList();
                    list1.add(temp.get(key));
                    map.put(key,list1);
                }
            }
        }
        return map;
    }

}
